<?php

// define array
$cities = array (
  0 => 'London',
  1 => 'Paris',
  2 => 'Barcelona',
  3 => 'Lisbon',
  'xyz' => 'Zurich',
);

// search array for value
$a = in_array('London1', $cities);
var_dump($a);
$b = array_search('Zurich', $cities);
var_dump($b);
